#ifndef WXSIMAGECOMBOPROPERTY_H
#define WXSIMAGECOMBOPROPERTY_H

#include "../../properties/wxscustomeditorproperty.h"
#include "../../properties/wxsproperties.h"
#include "../wxscodercontext.h"

class wxsImageComboProperty: public wxsCustomEditorProperty {
  public:
    wxsImageComboProperty( const wxString& PGName, const wxString& DataName, const wxString& DataSubName, long Offset, int Priority = 100 );
    virtual const wxString GetTypeName() { return _T( "wxArrayString" ); }
    virtual bool ShowEditor( wxsPropertyContainer* Object );
    virtual wxString GetStr( wxsPropertyContainer* Object );

  protected:

    virtual bool XmlRead( wxsPropertyContainer* Object, TiXmlElement* Element );
    virtual bool XmlWrite( wxsPropertyContainer* Object, TiXmlElement* Element );
    virtual bool PropStreamRead( wxsPropertyContainer* Object, wxsPropertyStream* Stream );
    virtual bool PropStreamWrite( wxsPropertyContainer* Object, wxsPropertyStream* Stream );

  private:
    long Offset;                            //!< The offset of a variable in this class.
    wxString DataSubName;    //!< The name to use for sub-item entries in XML.
    wxString DataName;            //!< The name to use for item entries in XML.
};

#define WXS_IMAGECOMBO(ClassName,VarName,PGName,DataName) \
  { static wxsImageComboProperty _Property(PGName,DataName,_T("item"),wxsOFFSET(ClassName,VarName)); \
    Property(_Property); }

#define WXS_IMAGECOMBO_P(ClassName,VarName,PGName,DataName,Priority) \
  { static wxsImageComboProperty _Property(PGName,DataName,_T("item"),wxsOFFSET(ClassName,VarName),Priority); \
    Property(_Property); }

#endif
